<?php
    $block_title =     $this->vote_info->thread_name.($this->vote_info->phase_name!=""?" - ".$this->vote_info->phase_name:"");
?>

                 
        <div id="wrapper">
            <div id="content">
            
                <!--Info:-->
                <div id="info" class="event-area">
                    <div class="event-header-long">
                        <span class="value">Bình chọn <?php echo $block_title?></span>                    
                    </div>
                    <div class="event-content-long">
						<div class="photo_poll">
                            <style>
                                .photo_menu li {
                                    list-style-type:none;
                                    display:inline;
                                    margin-right:20px;
                                }
                                .photo_menu ul {
                                    font-weight:bold;
                                    list-style-type:none;
                                }
                                .huongdanbinhchon {
                                    display:none; 
                                    border-bottom:1px solid #f5f5f5;
                                    border-top:1px solid #e9f4f8;
                                    padding:10px;
                                    background:url(<?php echo $this->spath;?>/images/binhchon_huongdan_bg.gif) top repeat-x;
                                }
                                .member_list {
                                    margin:0px;
                                    margin-bottom:15px;
                                    padding:0px 0px;
                                }
                                .member_list .item_member { 
                                    margin:0px;
                                    padding:0px;
                                    list-style-type:none;
                                    padding:5px 0px 5px 0px;
                                    background-color:#fff;
									border-bottom:1px solid #DFECF6;
                                }  
                                .member_list .item_member:hover { 
                                    background-color:#f6faff;
                                }                   
                                .member_list .header {                        
                                    list-style-type:none; 
                                    font-weight:bold;
                                    background:url(<?php echo $this->spath;?>/images/binhchon_title_bg.gif) repeat-x bottom;
                                    padding:5px 0px;
                                    margin-bottom:10px;
                                }
                                
                                .float-left { float:left}
                                .member_list .image { width:300px; padding-left:15px;}
                                .member_list .order { 
                                    position:absolute; 
                                    margin:4px 0px 0px 4px; 
                                    padding:2px; 
                                    background-color:#fff; 
                                    font-family:Georgia, "Times New Roman", Times, serif;
                                    filter: alpha(opacity=70);
                                    opacity:0.7;
                                    }
                                .member_list .image img { width:150px; height:100px; border:1px solid #e5e5e5; padding:1px;}
                                .member_list .name { width:150px;}
                                .member_list .name a{ font-weight:bold;}
                                .member_list .view { width:80px; text-align:center}
                                .member_list .sms { width:70px; text-align:center}
                                .member_list .web { width:70px; text-align:center}
                                .member_list .total { width:70px; text-align:center}
                                .member_list .soantin { color:#999999; margin-top:10px;}
                                .member_list .soantin .maso { color:#3366CC; font-weight:bold;}
                                .member_list .soantin .gui { color:#009900; font-weight:bold;}
                             </style>
                            <ul class="member_list">
                                <!--Tieu de:-->
                                <li class="header">
                                    <div class="float-left image">&nbsp;Thông tin</div>
                                    <!--<div class="float-left name">&nbsp;</div>-->
                                    <div class="float-left view">Xem</div>
                                    <div class="float-left sms">SMS</div>
                                    <div class="float-left web">Web</div>
                                    <div class="float-left total">Tổng</div>
                                    <div class="clear"></div>
                                </li>
                                <?php
								if(is_array($this->voted_list) && count($this->voted_list)>0){
								$i = 1;
								foreach($this->voted_list as $node){
						
									$img="http://img.tamtay.vn" . $node->thumbnail;
                                    $star = 0;
                                    if(isset($node->rate_value))
									    $star=ceil($node->rate_value/20);
                                    
									//$web_vote=round($o->rate_value*$o->vote_web_count, 0);
									$web_vote = $node->vote_web_count;
									if ($this->total_vote_web==0){
										$web_percent=0;
									}
									else{
										$web_percent=round($web_vote/$this->total_vote_web, 4)*100;
									}
									if ($this->total_vote_sms==0){
										$sms_percent=0;
									}
									else{
										$sms_percent=round($node->vote_sms_count/$this->total_vote_sms, 4)*100;
									}
									$t=$web_percent + $sms_percent;
								?>
                                <!--Danh sach thi sinh:-->
                                <li class="item_member">
                                    <div class="float-left image">
										<p style="padding-bottom: 0px;"><a href="http://music2.tamtay.vn/play/<?php echo $node->sid;?>" target="_blank"><strong><?php echo $node->title;?></strong></a></p>
						                <p class="soantin">Soạn : <span class="maso"><?php echo $this->vote_info->sms_command_code;?>&nbsp;<?php echo $node->sbd; ?></span> gửi <span class="gui"><?php echo $this->vote_info->sms_destination1;?></span> (<em><span style="color:red;"><?php echo $this->vote_info->sms_basic_num1;?></span> phiếu</em>)
                                    		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; hoặc gửi <span class="gui"><?php echo $this->vote_info->sms_destination2;?></span> (<em><span style="color:red;"><?php echo $this->vote_info->sms_basic_num2;?></span> phiếu</em>).
                                    	</p>
										
						            </div>
									<!--
						            <div class="float-left name">
						                <p><a href="http://music2.tamtay.vn/play/<?php echo $node->sid;?>" target="_blank"><?php echo $node->title;?></a></p>
						                <p><img src="http://img.tamtay.vn/images/stars<?php echo $star; ?>.gif" /></p>
						                <p class="soantin">Soạn tin: &nbsp; <span class="maso"><?php echo $this->vote_info->sms_command_code;?>&nbsp;&nbsp;<?php echo $node->sbd; ?></span> &nbsp; gửi &nbsp; <span class="gui"><?php echo $this->vote_info->sms_destination1;?></span></p>
						            </div>                        
									-->
						            <div class="float-left view">
						                <?php echo $node->play_count; ?>
						            </div>
						            <div class="float-left sms">
						                <?php echo $sms_percent;?>%
						            </div>
						            <div class="float-left web">
						                <?php echo $web_percent;?>%
						            </div>
						            <div class="float-left total">
						                <?php echo $t;?>%
						            </div>
						            <div class="clear"></div>
                                </li>
                              <?php
									}// End for loop
								}// End if
							?>
                            </ul>
                        </div>	                        
                    </div>
                </div>
                <!--End info-->

          </div>
        </div>       
        
        <!--right Bar:-->
        <div id="rightbar">
        	
            
      </div>
      
      
      <div id="rightbar">            
            <!--Slide:-->
            <div id="slide" class="event-area">
                <div class="event-header-short">
                    <span class="value">Slide</span>
                </div>
                <div class="event-content-short">
                    <div style="text-align:center">
                    <script type="text/javascript">
                        new fadeshow(fadeimages2, 245, 300, 0, 3000, 0, "R")
                    </script>
                    </div>
                    <p style="margin-top:10px;">
                        Hãy bình chọn cho các ca khúc mình yêu thích nhất!
                        Để đánh giá và bình chọn cho các ca khúc trên <a href="http://www.tamtay.vn" target="_blank">www.tamtay.vn</a> bạn cần phải <a href="<?php echo IDS_REGISTER_URL;?>" target="_blank">đăng ký</a> tài khoản.                                     
                    </p>
                </div>
            </div>
            <!--Het slide-->
            
            <div class="event-area">
                <a href="#" title="Bình chọn <?php echo $block_title?>" target="_blank"><img src="<?php echo $this->spath;?>/images/btn_binhchon.gif" /></a>
            </div>
            
            <!--Top 10 thi sinh:-->
                 <?php echo $this->top_block?>
            <!--Het top 10-->
            
            <div class="event-area"></div>
            
            <!--Gop y :-->
            <div id="wall" class="event-area">
                <div class="event-header-short">
                    <span class="value">Ý kiến khán giả</span>
                </div>
                    
                <div class="event-content-short" id="wall_block">
                    <?php echo $this->comment_block?>
                </div>                            
        </div>
            <!--Het gop y-->
            
            <div class="event-area"><a href="#" target="_blank"><img src="<?php echo $this->spath;?>/images/danhchoquangcao_300x120.gif" /></a></div>
        </div>
        
        <div class="clear"></div>